//
//  UseHelpView.swift
//  ShouChong
//
//  Created by yw on 2024/8/30.
//

import SwiftUI

struct UseHelpView: View {
    var body: some View {
        ScrollView(showsIndicators: false, content: {
            VStack(content: {
                useView
                    .padding(.vertical,10)
                phoneView
                    .padding(.bottom,10)
                watchView
            }).padding()
        })
        
    }
    
    var useView:some View {
        VStack {
            Text("1.使用说明")
                .modifier(MainTextModifier(fontSize: 15, fontWeight: .medium, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .padding(.bottom,4)
            
            Text("本App使用手机上的传感器，可以记录多种多样的运动，有些秘密运动却一直没有被记录😊，通过此App（iPhone、iWatch端）可以记录大家的运动")
                .modifier(MainTextModifier(fontSize: 13, fontWeight: .light, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .lineLimit(3)
        }
        .padding(10)
        .background(Color("color_white"))
        .cornerRadius(10)
    }
    
    var phoneView:some View {
        VStack {
            Text("2.iPhone端使用方法")
                .modifier(MainTextModifier(fontSize: 15, fontWeight: .medium, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .padding(.bottom,4)
            
            Text("如需记录使用用记录，请使用运动臂带将iPhone绑定您的小臂上")
                .modifier(MainTextModifier(fontSize: 13, fontWeight: .light, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/)
            HStack {
                Image("help_arm")
                    .resizable()
                    .aspectRatio(contentMode: .fit)
                    .frame(width: 100,height: 100)
                Image("help_phone")
                    .resizable()
                    .aspectRatio(contentMode: .fit)
                    .frame(width: 50,height: 50)
            }
        }
        .padding(10)
        .background(Color("color_white"))
        .cornerRadius(10)
        
    }
    
    var watchView:some View {
        VStack {
            Text("3.iWatch端使用方法")
                .modifier(MainTextModifier(fontSize: 15, fontWeight: .medium, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .padding(.bottom,4)
            
            Text("在iWatch中打开同名应用，点击首页开始按钮即可记录运动数据（在watch端运动时，请保持iPhone端应用开启，以免数据无法同步）")
                .modifier(MainTextModifier(fontSize: 13, fontWeight: .light, foreColor: Color("color_text_black")))
                .frame(maxWidth: .infinity,alignment: .leading)
                .lineLimit(3)
            HStack {
                Image("help_watch")
                    .resizable()
                    .aspectRatio(contentMode: .fit)
                    .frame(width: 100,height: 100)
            }
        }
        .padding(10)
        .background(Color("color_white"))
        .cornerRadius(10)
        
    }
    
    
}


